﻿<navigation:Page xmlns:my1="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    x:Class="AdminApp.Views.AllEvents"
    d:DesignWidth="640"
    d:DesignHeight="480"
    Title="AllEvents Page"
    xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Ria"
    xmlns:my="clr-namespace:AdminApp.Web.Services"
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data">
    
    <my1:BusyIndicator
        IsBusy="{Binding ElementName=allSlotsDomainDataSource, Path=DomainContext.IsLoading}">
    <Grid
        x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition
                Width="202" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <controls:TreeView
            x:Name="_tree"
            Margin="8" />
        <riaControls:DomainDataSource
            AutoLoad="True"
            Height="0"
            LoadedData="allSlotsDomainDataSource_LoadedData"
            Name="allSlotsDomainDataSource"
            QueryName="GetAllSlotsQuery"
            Width="0">
            <riaControls:DomainDataSource.DomainContext>
                <my:DigitalSignageDomainContext />
            </riaControls:DomainDataSource.DomainContext>
        </riaControls:DomainDataSource>
        <data:DataGrid
            AutoGenerateColumns="False"
            Grid.Column="1"
            ItemsSource="{Binding ElementName=allSlotsDomainDataSource, Path=Data}"
            Name="allSlotsDataGrid"
            RowDetailsVisibilityMode="VisibleWhenSelected"
            Margin="8">
            <data:DataGrid.Columns>
                <data:DataGridTemplateColumn
                    x:Name="slotDateColumn"
                    Header="Slot Date"
                    Width="150">
                    <data:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <controls:DatePicker
                                SelectedDate="{Binding Path=SlotDate, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" />
                        </DataTemplate>
                    </data:DataGridTemplateColumn.CellTemplate>
                </data:DataGridTemplateColumn>
                <data:DataGridTextColumn
                    x:Name="slotTimeColumn"
                    Binding="{Binding Path=SlotTime}"
                    Header="Slot Time"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="sessionTitleColumn"
                    Binding="{Binding Path=SessionTitle}"
                    Header="Session Title"
                    Width="300" />
                <data:DataGridTextColumn
                    x:Name="speakerFirstnameColumn"
                    Binding="{Binding Path=SpeakerFirstname}"
                    Header="Speaker Firstname"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="speakerLastnameColumn"
                    Binding="{Binding Path=SpeakerLastname}"
                    Header="Speaker Lastname"
                    Width="SizeToHeader" />
            </data:DataGrid.Columns>
        </data:DataGrid>
    </Grid>
        </my1:BusyIndicator>
</navigation:Page>
